package org.domain.sisbreve.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.domain.sisbreve.entity.enums.StatusAeronave;
import org.hibernate.annotations.Parameter;
import org.hibernate.annotations.Type;
import org.hibernate.validator.Length;
import org.jboss.seam.annotations.Name;

/**
 * @author ceub
 * 
 */
@Entity
@Table(name = "tt_aeronave")
@Name(value = "aeronave")
public class Aeronave implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="idt_aeronave", unique = true, nullable = false)
	private Integer id;
	
	@Column(name = "nme_aeronave", length = 45)
	@Length(max = 45)
	private String nomeAeronave;
	
	@Enumerated(EnumType.STRING)
	@Type(type = "org.domain.sisbreve.entity.usertype.EnumUserType",
		parameters = @Parameter(
		name = "enumClassName",
		value = "org.domain.sisbreve.entity.enums.StatusAeronave"))
	@Column(name = "sts_aeronave", length = 1)
	private StatusAeronave status;

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the nomeAeronave
	 */
	public String getNomeAeronave() {
		return nomeAeronave;
	}

	/**
	 * @param nomeAeronave
	 *            the nomeAeronave to set
	 */
	public void setNomeAeronave(String nomeAeronave) {
		this.nomeAeronave = nomeAeronave;
	}

	/**
	 * @return the status
	 */
	public StatusAeronave getStatus() {
		return status;
	}

	/**
	 * @param status
	 *            the status to set
	 */
	public void setStatus(StatusAeronave status) {
		this.status = status;
	}
}
